import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Container demo'),
        ),
        body: Center(
          child: Container(
//            color: Color(0xff00ff00), // decoration color 和 外面color有冲突，不能同时定义
            padding: EdgeInsets.only(top: 20, bottom: 20, left: 5, right: 2),
            width: 200,
            height: 300,
            decoration: BoxDecoration(
              border: Border.all(
                color: Colors.red,
                width: 10
              ),
              borderRadius: BorderRadius.all(Radius.circular(20)),
            ),
            child: Text(
              'text',
              style: TextStyle(fontSize: 28.0),
            ),
          ),
        ),
      ),
    );
  }
}
